//
// Created by dong on 2025/10/22.
//

#include "STriangle.h"

STriangle::STriangle(SDL_Rect rect, SDL_Color color):m_name("Triangle")
{
    setColor(color);
    m_rect = rect;
}

void STriangle::render(SDL_Renderer* render)
{
    SDL_SetRenderDrawColor(render,m_color.r,m_color.g,m_color.b,0);
    SDL_RenderDrawTriangle(render,&m_rect);
}

string STriangle::name() const
{
    return m_name;
}
